import { ApplyTypeEnum } from '@/enums/membershipEnum';
import { type IMemberItem, type UnitListResult } from '../mine/types';
import type { PriceShowTypeEnum, ProductStatusEnum, ProductTypeEnum } from '@/enums/productEnum';

export type isCardShow = 0 | 1;

export interface UnitCardDetailsResult {
  id: number;
  appUserId: number;
  cocId: number;
  name: string;
  address: string;
  officeTel: string;
  email: string;
  logo: string;
  memberDetails: string;
  display: number;
  video: string;
  videoCover: string;
  documentName: string;
  document: string;
  honorList: string[];
  isUpdate: boolean;
  socialIdentityList: string[];
  leadingMemberVoList: IMemberItem[];
  imgList: string[];
  mainBusinessList: string[];
  leaderIdList: number[];
  browseInfo: BrowseInfo;
  share: string;
  leaderId: number
  applyType: ApplyTypeEnum;
  // 主库ID
  orgCompanyId: number
  // 主库负责人ID
  memberLeadingId: number
  // 租户ID
  tenantId: number
  // 租户名称
  orgTenantName: string
}

export interface EditUnitCardDetailsData {
  id: number;
  cocId: number;
  name: string;
  address: string;
  officeTel: string;
  logo: string;
  memberDetails: string;
  video: string;
  videoCover: string;
  honorList: string[];
  imgList: string[];
  mainBusinessList: string[];
  leaderIdList: number[];
  documentName?: string;
  document: string;
  share?: string;
}

export interface BrowseInfo {
  avaList: string[];
  browseNum: number;
}

export interface PersonalCardDetailsResult {
  id: number;
  leaderId: number;
  name: string;
  avatar: string;
  socialPosition: string;
  phone: string;
  wechatId: string;
  personalHonorList: string[];
  video: string;
  videoCover: string;
  socialIdentityList: string[];
  imgList: string[];
  email: string;
  companyName: string;
  companyAddress?: string;
  companyTel: string;
  companyPositionName?: string;
  briefIntroduction: string;
  companiesDtoList: UnitListResult[];
  display: number;
  appUserId: number;
  isUpdate: boolean;
  mobileDisplay: number;
  emailDisplay: number;
  wechatIdDisplay: number;
  browseInfo: BrowseInfo;
  share: string;
  cocId: number;
  applyType: ApplyTypeEnum;
  isMemberCoupon: boolean
  // 主库ID
  memberLeadingId: number
  // 租户ID
  tenantId: number
  // 租户名称
  orgTenantName: string
  // 关注状态
  attention: boolean
  // 解锁状态
  unlockLeading: boolean
  // 订单编号
  orderCode: string
  // 是否开通支付
  saasMerchantIsEnable: boolean
  // 主库单位ID
  orgCompanyId: number
  unlockContact: boolean
}
export interface EditPersonalCardDetailsData {
  id: number;
  leaderId: number;
  name: string;
  avatar?: string;
  phone?: string;
  wechatId?: string;
  personalHonorList?: string[];
  videoCover?: string;
  video?: string;
  socialIdentityList?: string[];
  imgList?: string[];
  email?: string;
  briefIntroduction?: string;
  companiesDtoList?: { id: number, isShow: number, authentication: boolean }[];
  mobileDisplay?: number;
  emailDisplay?: number;
  wechatIdDisplay?: number;
  share?: string;
  /** 已选的商品id */
  productLibIds: number[]
}

export interface ProductListResult {
  productLibId: number
  productName: string
  imageUrl: string
  minPrice: number
  priceShowType: PriceShowTypeEnum
  // 0 自己的商品 1 分销商品
  distributionStatus: 0 | 1
  //产品类型
  productType: ProductTypeEnum
  /** 是否失效 */
  status: ProductStatusEnum
}
